@echo off

SET MACHINE_NAME=%1
SET CONNECT_OPTIONS=%2

FOR /F "eol=; tokens=1,2 delims==" %%i in (%~dp0\vbox_kd.ini) do (
    if "%%i" equ "VBoxManageFile" (
        echo "%%j" setextradata %MACHINE_NAME% "KD/ConnectOptions" %CONNECT_OPTIONS%
        "%%j" setextradata %MACHINE_NAME% "KD/ConnectOptions" %CONNECT_OPTIONS%
    )
)
